<template>
	<select v-model="uo" class="weui-input" @change="uoChange()">
		<option value="">请选择</option>
		<option v-for="item in usefulOpinion" :key="item" :value="item">{{item}}</option>
	</select>
</template>

<script>
import Vue from 'vue'

export default {
	components : {
	},
	props: {
	},
  	data() {
		return {
			uo : "",
			usefulOpinion : [],
	    }
	},
 	mounted(){
		this.usefulOpinion = [ "同意", "请注意，情况复杂！", "情况紧急，请尽快处理！","驳回"];
  		var url = Vue.__ctx + "/dailyPhrases/sysDailyPhrases/userListJson";
    	var post = Vue.baseService.postForm(url,{});
    	var that = this;
    	post.then(function(result){
    		if(!result.isOk){
    			Vue.tools.toast("获取用户常用语异常","warn");
    			return;
    		}
    		if(result.rows.length == 0){
    			return;
    		}
    		that.usefulOpinion = [];
    		result.rows.forEach(function(item){
    			that.usefulOpinion.push(item.locution);
    		});
    	});
 	},
	methods: {
		uoChange : function(){
			this.$emit("setOpinion",this.uo);
			this.uo = "";
		},
  	},
 	watch : {
 		
 	}
}
</script>